package com.activemq.boot;

import lombok.Data;
import lombok.ToString;
import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

@Component
@Data
@ToString
//@ConfigurationProperties
public class ConfigBean {
    @Value("${my-queue}")
    private String myQueue;

    @Bean
    public Queue queue() {
        return new ActiveMQQueue(myQueue);
    }
}